<template>
  <div class="groupbody">
    <div class="assemble-item">
      <div
        class="assemble-shop-item fx"
        v-for="(item, i) in info.banner"
        :key="i"
      >
        <img :src="$fnc.getImgUrl(item.piclink)" alt="" />
        <div>
          <p>{{ item.title }}</p>
          <p>
            <img src="@/assets/img/home/cut_kline.png" alt="" />
            邀请{{ item.bargain_number }}人帮砍即成
          </p>
          <p>限时{{ item.bargain_time }}小时</p>
          <div class="cut_price_sale">
            <div class="sale_left">
              <p>原价</p>
              <p><small>￥</small>{{ Number(item.price) }}</p>
            </div>
            <div class="sale_right">
              砍后{{
                $fnc.toFixedZ(
                  (Number(item.price) * 1000 -
                    Number(item.bargain_price) * 1000) /
                    1000
                )
              }}元
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  props: {
    info: {
      type: Object,
      default: () => ({}),
    },
  },
  components: {},
  methods: {},
};
</script>
<style lang="less" scoped>
.groupbody {
  width: 94%;
  margin: 0 auto;
}
.assemble-item {
  > div:not(:first-child) {
    margin-top: 10px;
  }
}
.assemble-shop-item {
  font-size: 14px;
  line-height: 1.2;
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
  justify-content: flex-start;
  align-items: center;
  // padding: 0 10px;
  > img {
    width: 125px;
    height: 125px;
    margin-right: 5px;
  }
  > div {
    padding: 0px 10px 0px 4px;
    min-height: 142px;
    flex: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    > p:nth-of-type(1) {
      line-height: 1.4;
      color: #1a1a1a;
      margin: 10px 0;
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
    }

    > p:nth-of-type(2) {
      font-size: 12px;
      font-weight: bold;
      text-align: left;
      color: #ec7e1b;
      line-height: 26px;
      display: flex;
      flex-wrap: nowrap;
      justify-content: flex-start;
      align-items: center;
      img {
        width: 15px;
        margin-right: 5px;
      }
    }
    > p:nth-of-type(3) {
      font-size: 12px;
      color: #999;
      font-weight: 500;
      text-align: left;
      display: flex;
      flex-wrap: nowrap;
      justify-content: flex-start;
      align-items: center;
      line-height: 1.4;
    }
  }
}
.cut_price_sale {
  width: 210px;
  height: 36px;
  background: url("../../../../assets/img/home/cut_shop_bottom.png") no-repeat;
  background-size: 100% 100%;
  margin-top: 5px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  .sale_left {
    width: 66px;
    height: 36px;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    line-height: 1.1;
    > p:nth-of-type(1) {
      font-size: 12px;
      color: #dd2f26;
    }
    > p:nth-of-type(2) {
      font-size: 15px;
      font-weight: 500;
      color: #dd2f26;
      small {
        font-size: 10px;
      }
    }
  }
  .sale_right {
    flex: 1;
    margin-right: 10px;
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
</style>
